#ifndef _NE_SPHERE_H_
#define _NE_SPHERE_H_

#include <mathematics/Vector3.h>

namespace ne
{
    class Plane;
    class AABB;

    class NEAPI Sphere
    {
        public:
            Sphere();

            Sphere(const Sphere &s);

            Sphere(const Vector3 &vCenter, const real r);

            void redefine(const Vector3 &vCenter, const real r);

            bool intersects(const Sphere &s) const;

            bool intersects(const AABB &a) const;

            bool intersects(const Plane &p) const;

            bool intersects(const Vector3 &v) const;

            Sphere& operator = (const Sphere &s);

            bool operator == (const Sphere &s) const;

            bool operator != (const Sphere &s) const;

            // Function for writing to a stream.
            NEAPI friend std::ostream& operator << (std::ostream &o, const Sphere &s);

            inline ~Sphere() {}

        public:
            Vector3 center;
            real radius;
    };
}

#endif
